namespace = LOREXP
narrative_event = {
	id = LOREXP.0003
	title = LOREXPTitle.0003
	desc = LOREXPDesc.0003
	picture = GFX_evt_rome_restored_byzantine
	is_triggered_only = yes
	
	immediate = {
		if = {
			limit = {
				ai = no
			}
			set_character_flag = achievement_legacy_of_rome
		}
	}
	
	option = {
		name = LOREXP.0003A
		hidden_tooltip = {
			primary_title = {
				any_direct_de_jure_vassal_title = {
					de_jure_liege = e_roman_empire
				}
			}
		}
		princely_elective_apply_elector_setup_effect = yes
		e_roman_empire = {
			show_scope_change = no
			grant_title = ROOT
			hidden_tooltip = { make_primary_title = yes }
			copy_title_laws = e_hre
			copy_title_history = e_hre
			add_law = succ_hre_elective2
			set_title_flag = holy_RE
			if = {
				limit = {
					has_game_rule = {
						name = custom_rome_coa
						value = inheritedromecoa 
							}
					}
				set_coa = e_hre
				}
		}
		e_hre = {
			show_scope_change = no
			destroy_landed_title = THIS
		}
		hidden_tooltip = {
			activate_title = { title = e_hre status = no }
			any_playable_ruler = {
				limit = {
					NOT = { has_landed_title = e_hre }
					ai = no
				}
				narrative_event = { id = LOREXP.0004 }
			}
			if = { #Hellenic Resurgence
				limit = { 
					has_dlc = "Holy Fury" 
					religion_group = christian
					has_game_rule = {
						name = hellenism_rule
						value = on
					}
					OR = { 
						culture = german
						culture = italian
						culture = roman
					}
				}
				character_event = { id = HF.23106 days = 15 }				
			}
			if = { #Burn and Rebuild Rome.
				limit = { 
					has_dlc = "Holy Fury" 
					333 = { any_province_holding = { holding_type = temple count = 2 } } #Check if Gengis Khan or whomever hasn't already leveled the place down.
				}
				333 = { province_event = { id = HF.23100 days = 155 } }				
			}
		}

		add_trait = augustus
		give_nickname = nick_the_glorious
		if = { #New Imperial Bloodline. (male)
				limit = { 
					has_dlc = "Holy Fury" 
					is_female = no
					is_alternate_start = no
					OR = { 
						religion_group = christian
						religion = hellenic_pagan
						religion = hellenic_pagan_reformed
					}
	    			NOT = {
	    				any_owned_bloodline = {
    						has_bloodline_flag = roman_bloodline #Not if already member of a famous historical Roman Bloodline.
    					}
    				}
				}
				create_bloodline = {
					type = roman_emperor_male
				}
				new_bloodline = {
					set_description = "bloodline_desc_roman"
				}	
				sound_effect = bloodline_added			
			}
		if = { #New Imperial Bloodline. (female)
			limit = { 
				has_dlc = "Holy Fury" 
				is_female = yes
				is_alternate_start = no
				OR = { 
					religion_group = christian
					religion = hellenic_pagan
					religion = hellenic_pagan_reformed
				}
    			NOT = {
    				any_owned_bloodline = {
						has_bloodline_flag = roman_bloodline #Not if already member of a famous historical Roman Bloodline.
					}
				}
			}
			create_bloodline = {
				type = roman_emperor_female
			}
			new_bloodline = {
				set_description = "bloodline_desc_roman"
			}				
			sound_effect = bloodline_added
		}
	}
}

# Informed about Restoration of Rome
narrative_event = {
	id = LOREXP.0004
	title = LOREXPTitle.0004
	desc = {
		text = LOREXPDesc1.0004
		trigger = { 
			is_alternate_start = no
		}
	}
	desc = {
		text = LOREXPDesc1.0004
		trigger = { 
			is_alternate_start = yes
		}
	}
	
	picture = GFX_evt_rome_restored_byzantine
	
	is_triggered_only = yes
	
	option = {
		name = LOREXP.0004A
		trigger = {
			NOT = { has_landed_title = e_byzantium }
		}
	}
	option = {
		name = LOREXP.0004B
		trigger = {
			has_landed_title = e_byzantium
		}
		prestige = -500
	}
}